FROM elasticsearch:6.8.0

# 官方中文分词 smartcn
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-smartcn

WORKDIR  /usr/share/elasticsearch/plugins

# ik中文分词 ik_max_word  ik_smart
COPY ./elasticsearch-analysis-ik-6.8.0.zip ./
RUN unzip elasticsearch-analysis-ik-6.8.0.zip -d ik && rm -f elasticsearch-analysis-ik-6.8.0.zip

# 拼音搜索 pinyin
COPY ./elasticsearch-analysis-pinyin-6.8.0.zip ./
RUN unzip elasticsearch-analysis-pinyin-6.8.0.zip -d pinyin && rm -f elasticsearch-analysis-pinyin-6.8.0.zip
